<ion-view view-title="咨询列表">

    <div class="tabs-striped tabs-top">
        <div class="tabs">
            <a ng-class="{'tab-item':true,'active': viewMode == 0 }" ng-click="switchMode(0)">全部问题</a>
            <a ng-class="{'tab-item':true,'active': viewMode == 1 }" ng-click="switchMode(1)">我的问题</a>
            <a ng-class="{'tab-item':true,'active': false }" ng-click="addConsult()">我要提问</a>
        </div>
    </div>


    <ion-content class="padding has-tabs-top">
        <ion-refresher pulling-text="下拉刷新" pulling-icon="ion-loading-c" refreshing-text="刷新成功"
                       refreshing-icon="ion-loading-c" on-refresh="loadList(true)">
        </ion-refresher>
        <ion-list class="list card">
            <a ng-repeat="item in consultList | orderObjectBy:'time':'nid':'true'" class="item item-thumbnail-left"
               href="#/tabs/consult/consultList/{{item.nid}}">
                <img ng-src="{{ item.author_pic }}">

                <h2>{{ item.title }}</h2>

                <p>{{ item.body }}</p>

                <p>{{ item.time }}</p>
            </a>

            <div ng-if="listEnd" class="text-center">
                已显示全部内容
            </div>
        </ion-list>
        <ion-infinite-scroll ng-if="!listEnd" on-infinite="loadList(false)" distance="1%"></ion-infinite-scroll>
    </ion-content>
</ion-view>